import request from '@/utils/request'

//获取商品列表
export const reqTrademarkList = (page,limit) => request({ url: `/admin/product/baseTrademark/${page}/${limit}`,method: 'GET' });

//添加商品//解构赋值
export const reqAddOrUpdateTrademark = (form) => {
    if (!form.id) {
        return request({ url: '/admin/product/baseTrademark/save', data:form, method: 'POST' });
    }
    else {
        return request({ url: '/admin/product/baseTrademark/update', data:form, method: 'PUT' });
    }
}
//更新商品
// export const reqUpdateTrademark = ({ id, tmName, logoUrl }) => request({ url: '/admin/product/baseTrademark/update', data: {id,tmName,logoUrl}, method: 'PUT' });

//删除商品
export const reqDeleteTradeMark = (id) => request({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'DELETE' });